package application.view 
{
	import application.ApplicationFacade;
	import application.model.VO.ModuleVO;
	import application.view.viewComponent.ModuleView;
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	/**
	 * ...
	 * @author Ning
	 */
	public class ModuleMediator extends Mediator implements IMediator
	{
		public static const NAME:String = 'ModuleMediator';
		public function ModuleMediator(viewComponent:ModuleView) 
		{
			super(NAME, viewComponent);
		}
		override public function handleNotification(notification:INotification):void 
		{
			switch(notification.getName())
			{
				case ApplicationFacade.UPDATE_MODULE_DATA:
				moduleView.updateData(notification.getBody() as ModuleVO);
				break;
			}
		}
		override public function listNotificationInterests():Array 
		{
			return [ApplicationFacade.UPDATE_MODULE_DATA];
		}
		private function get moduleView():ModuleView {
			return viewComponent as ModuleView;
		}
	}
}